use std::{env, process};
use c12p00_minigrep::*;
fn main() {
    let config = Config::new(env::args()).unwrap_or_else(|error|{
        eprintln!("Problem parsing arguments:\t{}", error);
        process::exit(137);
    });
    let _t = run(config);
    if let Err(e) = _t{
        eprintln!("Application Error: {}", e);
        process::exit(121);
    }
}
